﻿using HMS.Data;
using HMS.DataContract.Response;
using HMS.DataContract.Enums;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace HMS.Facade
{
    public class UserFacade
    {
        public UserInfo ValidateUser(string accessCode)
        {
            UserService userService = new UserService();
            dynamic userDetails = userService.ValidateUser(accessCode);
            UserInfo userInfo = new UserInfo();
            userInfo.Id = userDetails.userId;
            userInfo.Detail = userDetails.userType;
            userInfo.ClinicId = userDetails.ClinicId;
            userInfo.UserName = userDetails.UserName;
            return userInfo;
        }
    }
}
